import 'package:flutter/material.dart';

class Category extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return Page();
  }
}
class Page extends State<Category>{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return layout(context);
  }
  Widget layout(BuildContext context){
    return Scaffold(
      appBar: buildAppBar(context),
      body: ListView(
        children: <Widget>[
          getImageFromNet('http://i2.yeyou.itc.cn/2014/huoying/hd_20140925/hyimage08.jpg'),
          getImageFromNet('http://i2.yeyou.itc.cn/2014/huoying/hd_20140925/hyimage08.jpg'),
          getImageFromNet('http://i2.yeyou.itc.cn/2014/huoying/hd_20140925/hyimage08.jpg'),
          getImageFromNet('http://i2.yeyou.itc.cn/2014/huoying/hd_20140925/hyimage08.jpg'),
          getImageFromNet('http://i2.yeyou.itc.cn/2014/huoying/hd_20140925/hyimage08.jpg'),
        ],
      ),
    );
  }
  Widget buildAppBar(BuildContext context){
    return AppBar(title: Text('分类'));
  }
  Widget getImageFromNet(url){
    return Image.network(url);
  }
}